'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.removeEmptyAttr = undefined;

var _inArrayStrict = require('./inArrayStrict');

var removeEmptyAttr = exports.removeEmptyAttr = function removeEmptyAttr() {
    var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    var omit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['', null, undefined];

    var rst = {};
    var val = void 0;
    for (var key in data) {
        val = data[key];
        if ((0, _inArrayStrict.inArrayStrict)(val, omit)) {
            continue;
        }
        rst[key] = val;
    }
    return rst;
};
exports.default = removeEmptyAttr;